/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "employee")
@XmlRootElement(name = "employee")
@NamedQueries({
    @NamedQuery(name = "Employee.findAll", query = "SELECT e FROM Employee e"),
    @NamedQuery(name = "Employee.findByEmployeeID", query = "SELECT e FROM Employee e WHERE e.employeeID = :employeeID"),
    @NamedQuery(name = "Employee.findByBasicsalary", query = "SELECT e FROM Employee e WHERE e.basicsalary = :basicsalary"),
    @NamedQuery(name = "Employee.findByPf", query = "SELECT e FROM Employee e WHERE e.pf = :pf"),
    @NamedQuery(name = "Employee.findByHra", query = "SELECT e FROM Employee e WHERE e.hra = :hra"),
    @NamedQuery(name = "Employee.findByDa", query = "SELECT e FROM Employee e WHERE e.da = :da"),
    @NamedQuery(name = "Employee.findByTa", query = "SELECT e FROM Employee e WHERE e.ta = :ta"),
    @NamedQuery(name = "Employee.findByNetsalary", query = "SELECT e FROM Employee e WHERE e.netsalary = :netsalary"),
    @NamedQuery(name = "Employee.findByIsdeleted", query = "SELECT e FROM Employee e WHERE e.isdeleted = :isdeleted"),
    @NamedQuery(name = "Employee.findByDeleteddate", query = "SELECT e FROM Employee e WHERE e.deleteddate = :deleteddate"),
    @NamedQuery(name = "Employee.findByUpdateddate", query = "SELECT e FROM Employee e WHERE e.updateddate = :updateddate"),
    @NamedQuery(name = "Employee.findByDeletedby", query = "SELECT e FROM Employee e WHERE e.deletedby = :deletedby"),
    @NamedQuery(name = "Employee.findByUpdatedby", query = "SELECT e FROM Employee e WHERE e.updatedby = :updatedby")})
public class Employee implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "EmployeeID")
    private Long employeeID;
    @Column(name = "basicsalary")
    private Double basicsalary;
    @Column(name = "pf")
    private Double pf;
    @Column(name = "hra")
    private Double hra;
    @Column(name = "da")
    private Double da;
    @Column(name = "ta")
    private Double ta;
    @Column(name = "netsalary")
    private Double netsalary;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    @Column(name = "deleteddate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date deleteddate;
    @Column(name = "updateddate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateddate;
    @Column(name = "deletedby")
    private BigInteger deletedby;
    @Column(name = "updatedby")
    private BigInteger updatedby;
    @JoinColumn(name = "person_PersonID", referencedColumnName = "PersonID")
    @ManyToOne(optional = false)
    private Person person;

    public Employee() {
    }

    public Employee(Long employeeID) {
        this.employeeID = employeeID;
    }

    public Long getEmployeeID() {
        return employeeID;
    }

    public void setEmployeeID(Long employeeID) {
        this.employeeID = employeeID;
    }

    public Double getBasicsalary() {
        return basicsalary;
    }

    public void setBasicsalary(Double basicsalary) {
        this.basicsalary = basicsalary;
    }

    public Double getPf() {
        return pf;
    }

    public void setPf(Double pf) {
        this.pf = pf;
    }

    public Double getHra() {
        return hra;
    }

    public void setHra(Double hra) {
        this.hra = hra;
    }

    public Double getDa() {
        return da;
    }

    public void setDa(Double da) {
        this.da = da;
    }

    public Double getTa() {
        return ta;
    }

    public void setTa(Double ta) {
        this.ta = ta;
    }

    public Double getNetsalary() {
        return netsalary;
    }

    public void setNetsalary(Double netsalary) {
        this.netsalary = netsalary;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    public Date getDeleteddate() {
        return deleteddate;
    }

    public void setDeleteddate(Date deleteddate) {
        this.deleteddate = deleteddate;
    }

    public Date getUpdateddate() {
        return updateddate;
    }

    public void setUpdateddate(Date updateddate) {
        this.updateddate = updateddate;
    }

    public BigInteger getDeletedby() {
        return deletedby;
    }

    public void setDeletedby(BigInteger deletedby) {
        this.deletedby = deletedby;
    }

    public BigInteger getUpdatedby() {
        return updatedby;
    }

    public void setUpdatedby(BigInteger updatedby) {
        this.updatedby = updatedby;
    }

    public Person getPerson() {
        return person;
    }

    public void setPerson(Person person) {
        this.person = person;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (employeeID != null ? employeeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Employee)) {
            return false;
        }
        Employee other = (Employee) object;
        if ((this.employeeID == null && other.employeeID != null) || (this.employeeID != null && !this.employeeID.equals(other.employeeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Employee[employeeID=" + employeeID + "]";
    }

}
